<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

namespace Database\Factories;

use App\Models\HonorDisgrace;
use Illuminate\Database\Eloquent\Factories\Factory;

class HonorDisgraceFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = HonorDisgrace::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'name' => $this->faker->name,
            'title' => $this->faker->title,
            'organization' => $this->faker->company,
            'content' => $this->faker->text,
            'push_time' => time() - rand(0, (7 * 24 * 3600)),
            'decision_time' => time(),
            'images' => (function () {
                return $this->faker->imageUrl() . ',' . $this->faker->imageUrl();
            })(),
            'type' => rand(1, 2),
            'credit_code' => rand(10000000, 99999999),
            'document_number' => rand(10000000, 99999999) . '号',
        ];
    }
}
